<?php

session_start();

include_once('config.php');


$id = $_POST['id'];
$userID = $_SESSION['id'];
$sql = "DELETE FROM `user` WHERE id = $id";
$result = mysql_query($sql);



echo '
                    <tr style="background-color: #0080C0; color: white; text-align: left; font-weight: 600;">
                        <td>First Name</td>
                        <td>Last Name</td>
                        <td>User Name</td>
                        <td>Password</td>
                        <td>Active</td>
                        <td></td>
                    </tr>';

    $sql = "SELECT * FROM `user`";
    $result = mysql_query($sql);
    while ($row = mysql_fetch_array($result)) {
        echo '<tr>
                        <td><input type="text" id="fistName" value="' . $row['firstName'] . '"/></td>
                        <td><input type="text" id="lastName" value="' . $row['lastName'] . '"/></td>
                        <td><input type="text" id="userName" value="' . $row['userName'] . '"/></td>
                        <td><input type="text" id="password" value="' . $row['password'] . '"/></td>
                        <td>
                            <select id="userStatus">
                                <option value="1">Active</option>
                                <option value="0">Not Active</option>
                            </select>
                        </td>
                            <td>
                                <a href="javascript:void(0);" title="deleteUser" class="deleteUser" content="' . $row['id'] . '"><img src="images/delete.png" width="20px;" content="' . $row['id'] . '" style="float:right; margin-right:20px;"/></a>
                                <a href="javascript:void(0);" title="updateUser" calss="updateUser" content="' . $row['id'] . '"><img src="images/update.png" class="update" content="' . $row['id'] . '" width="20px;" style="float:right; margin-right:10px;"/></a>
                            </td>
                        
                        </tr>';
    }

/*
 * To change this template, choose Tools | Templates
 * and open the template in the editor.
 */
?>
